package cn.dslcode.security.common.util;

import javax.servlet.http.HttpServletRequest;

/**
 * @author dongsilin
 * @version 2018/4/3.
 */
public class HttpHelper {
    public static boolean isAjaxRequest(HttpServletRequest request) {
        String ajaxFlag = request.getHeader("X-Requested-With");
        return ajaxFlag != null && "XMLHttpRequest".equals(ajaxFlag);
    }
}
